package org.example.sdpback.config;

import io.swagger.v3.oas.models.ExternalDocumentation;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @ProjectName: sdp-back
 * @Package: org.example.sdpback.config
 * @ClassName: SwaggerConfig
 * @Author: zhuxingyue
 * @Description: swagger配置
 * @Date: 2024/10/29 12:21
 * @Version: 1.0
 **/
@Configuration
public class SwaggerConfig {
    @Bean
    public OpenAPI openAPI(){
        return new OpenAPI()
                .info(new Info().title("sdp接口文档")
                        .description("自研平台接口文档")
                        .version("v1.0.0")
                        .contact(new Contact().name("zxy").url("localhost:8090/login"))
                )
                .externalDocs(new ExternalDocumentation()
                        .description("接口文档地址")
                        .url("https://github.com/")
                );
    }
}
